# -*- coding:utf-8 -*-
from django.shortcuts import render
from models import Snippet
from serializer import SnippetSerializer
from rest_framework import viewsets


class SnippetViewSet(viewsets.ModelViewSet):
    """
    这一viewset提供了`list`, `create`, `retrieve`, `update` 和 `destroy`

    但我们需要自己设置 `highlight`.
    """
    queryset = Snippet.objects.all()
    serializer_class = SnippetSerializer
